package com.server.core;

import com.common.MarshallingCodeCFactory;
import com.server.core.handler.ActionHandler;
import io.netty.channel.*;

public class FileServerInitializer extends ChannelInitializer<Channel> {

    @Override
    protected void initChannel(Channel ch){
        ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(MarshallingCodeCFactory.buildMarshallingDecoder());
        pipeline.addLast(MarshallingCodeCFactory.buildMarshallingEncoder());
        pipeline.addLast("ActionHandler", new ActionHandler());
    }

}
